<template>
  <div>
    <el-button type="primary" @click="register">申请资质</el-button>
  </div>
</template>

<script>
export default {
    name: "register_shop",
    data(){
      return {
        deleteid:"",
        id:"",
        recipient :"",
      country :"",
       province : "",
     city : "",
     counties :"",
    detailedAddress : "",
       postalcode :"",
     contactNumber : "",
      isDefault :"",
        keyword:""
      }
    },
    methods:{
        register()
        {

          let config = {
            headers: {
              "tokenValue":this.$store.getters.getUser
            }
          }
            axios.post('http://myphoenixshop.cpolar.io/insert_seller',{
              name:"llf"
            },config).then(res=>{
                    console.log(res);
            })
        },
        queryAddresses()
        {
          axios.get('http://myphoenixshop.cpolar.io/getAddresses',{
            headers:{
              "tokenValue":this.$store.getters.getUser
            }
          }).then(res=>{
            console.log(res);
          })
        },
        editaddress()
        {
          axios.post('http://myphoenixshop.cpolar.io/setDefaultAddress', {
            addressesId:this.id
          },{
            headers:{
              "tokenValue":this.$store.getters.getUser
            }
          }).then(res=>{
            console.log(res);
          })
        },
        addaddress()
        {
          axios.post('http://myphoenixshop.cpolar.io/addAddress', {
            recipient :this.recipient,
            country :this.country,
            province : this.province,
            city : this.city,
            counties :this.counties,
            detailedAddress : this.detailedAddress,
            postalcode :this.postalcode,
            contactNumber : this.contactNumber,
            isDefault :0
          },{
            headers:{
              "tokenValue":this.$store.getters.getUser
            }
          }).then(res=>{
            console.log(res);
          })
        },
       deleteaddress()
       {
         axios.post('http://myphoenixshop.cpolar.io/deleteAddress', {
           addressesId:this.deleteid
         },{
           headers:{
             "tokenValue":this.$store.getters.getUser
           }
         }).then(res=>{
           console.log(res);
         })
       },
       GetOnsellGoods(){
         axios.post('http://myphoenixshop.cpolar.io/findSellerBooksPage', {
         "pageNum":1,
           "pageSize":100
         },{
           headers:{
             "tokenValue":this.$store.getters.getUser
           }
         }).then(res=>{
           console.log(res);
         })
       },
       GetSerchGoods(){
         axios.post('http://myphoenixshop.cpolar.io/findBooksByKeyWord', {
           "pageNum":1,
           "pageSize":100,
           keyWord:this.keyword
         },{
           headers:{
             "tokenValue":this.$store.getters.getUser,

           }
         }).then(res=>{
           console.log(res);
         })
       }
    }
}
</script>

<style scoped>

</style>
